/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainMenu.java
 *
 * Created on Oct 8, 2011, 11:17:45 AM
 */

package form;

import javax.swing.JFrame;

/**
 *
 * @author bi
 */
public class MainMenu extends JFrame {

    JFrame myChild;

    /** Creates new form MainMenu */
    public MainMenu() {
        initComponents();
        this.setLocation(300, 100);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        btnManagement = new javax.swing.JButton();
        btnDayEvent = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        btnExit = new javax.swing.JButton();
        btnBackup = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Warhammer 40.000: Text Game - Main Menu");
        getContentPane().setLayout(new java.awt.GridBagLayout());

        btnManagement.setText("Management");
        btnManagement.setMaximumSize(new java.awt.Dimension(100, 30));
        btnManagement.setMinimumSize(new java.awt.Dimension(100, 30));
        btnManagement.setPreferredSize(new java.awt.Dimension(100, 30));
        btnManagement.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnManagementActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(btnManagement, gridBagConstraints);

        btnDayEvent.setText("Day Event");
        btnDayEvent.setMaximumSize(new java.awt.Dimension(100, 30));
        btnDayEvent.setMinimumSize(new java.awt.Dimension(100, 30));
        btnDayEvent.setPreferredSize(new java.awt.Dimension(100, 30));
        btnDayEvent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDayEventActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(btnDayEvent, gridBagConstraints);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setText("Warhammer 40.000: Text Game");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
        getContentPane().add(jLabel1, gridBagConstraints);

        btnExit.setText("Exit");
        btnExit.setMaximumSize(new java.awt.Dimension(100, 30));
        btnExit.setMinimumSize(new java.awt.Dimension(100, 30));
        btnExit.setPreferredSize(new java.awt.Dimension(100, 30));
        btnExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExitActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(btnExit, gridBagConstraints);

        btnBackup.setText("Backup");
        btnBackup.setMaximumSize(new java.awt.Dimension(100, 30));
        btnBackup.setMinimumSize(new java.awt.Dimension(100, 30));
        btnBackup.setPreferredSize(new java.awt.Dimension(100, 30));
        btnBackup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBackupActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(btnBackup, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnDayEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDayEventActionPerformed
        myChild = new DayEvent(this,0);
        myChild.setVisible(true);
        this.setVisible(false);
}//GEN-LAST:event_btnDayEventActionPerformed

    private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExitActionPerformed
        this.dispose();
}//GEN-LAST:event_btnExitActionPerformed

    private void btnManagementActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnManagementActionPerformed
        myChild = new Management(this,0);
        myChild.setVisible(true);
        this.setVisible(false);
}//GEN-LAST:event_btnManagementActionPerformed

    private void btnBackupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackupActionPerformed
        myChild = new Backup(this);
        myChild.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_btnBackupActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBackup;
    private javax.swing.JButton btnDayEvent;
    private javax.swing.JButton btnExit;
    private javax.swing.JButton btnManagement;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

}
